#pragma once

#include <ECS/ECS.h>
#include <ECS/Containers/TiledArray.h>
#include <cstdint>
#include "Pathfinding/TileData.h"

struct LandscapeDef
{
	mtMETA_DEC;
	ECS::TiledArray<TileDataDef> tiles;
};

class Landscape : public ECS::Component
{
	mtMETA_DEC;
public:
	Landscape();
	virtual ~Landscape();

	static Landscape* getInstance();

	bool initWith(LandscapeDef* def);

	void setTile(int x, int y, TileGID gid);
	TileGID getTile(int x, int y) const;

	MapData* getMap();

protected:
	MapData _map;
};
